<?php

namespace goosh;

try
{
  if(!function_exists('curl_init'))
  throw new gooshException('curl extension for php not installed. Type `apt-get install php5-curl` to install it');
  
  checkinstall();

  if(!isset($argv[1]))
  
  {
    println(file_get_contents(__DIR__.'/intro.txt'));
    interact();
  }

  else

  {
    $args=$argv;
    
    array_shift($argv);
    
    interact($argv,false);
  }
}
catch(\Exception $e)
{
  println('Fatal error: '.$e->getMessage());
}
